import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'
import Index from '../views/index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: '',
    component: Index,
    redirect: {
      name: 'main'
    },
    hidden: false,
  }, {
    path: '/main',
    name: 'main',
    component: Index,
    iconCls: 'el-icon-tickets',
    children: [{
      path: '/basicInformation/shopInfo',
      name: '商品管理',
      component: import('@/views/wholesaleMarket/ShopInfo')
    }, {
      path: '/goods/index',
      name: '商铺信息',
      component: import('@/views/wholesaleMarket/Index')
    }]
  }
  // {
  //   path: '/',
  //   name: '',
  //   redirect: {
  //     name: 'main'
  //   }
  // },
  // {
  //   path: '/main',
  //   name: 'main',
  //   component: index,
  //   children: [
  //     {
  //       path: '/basicInformation/index',
  //       name: '基本人事档案',
  //       component: import('@/views/wholesaleMarket/Index')
  //     },
  //     {
  //       path: '/basicInformation/shopInfo',
  //       name: 'ShopInfo',
  //       title: '商铺信息',
  //       component: import('@/views/wholesaleMarket/ShopInfo')
  //     }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
